home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1994
/
MacHack 1994.toast
/
MacHack™94
/
Talks & Papers
/
Timothy Knox
/
Help
/
Help Files
/
Miscellaneous
/
Gabriel Benchs
< prev
next >
Wrap
Text File
|
1994-06-24
|
873b
|
40 lines
{••••••••••••••••••••••• Some Gabriel Benchmarks •••••••••••••••••••••••}
{••• tak •••}
(define (tak x y z)
(cond (not (<? y x))
z
(tak (tak (1- x) y z)
(tak (1- y) z x)
(tak (1- z) x y))))
{••• Timing IIci •••}
(chrono (tak 18 12 6))
{ = [7 2.243333333333333333e+1 1.333333333333333333e+0] }
{••• Timing IIci, strictness info added •••}
(setstrict tak %111)
(chrono (tak 18 12 6))
{ = [7 1.890000000000000000e+1 5.166666666666666666e-1] }
{••• Another one, so good for lazyness !!! •••}
(define (rd2 l)
(cond (null? l) ()
(cons (0 l)(rd2 (-2 l)))))
(define (t n)
(cond (zero? n) ()
(begin (rd2 ll)(rd2 ll)(rd2 ll)(rd2 ll)(t (1- n)))))
(define (c n)
(cond (zero? n) ()
(cons () (c (1- n)))))
(define ll (c 200))
{••• try it, faster than a CRAY: lazyness -> does nothing •••}
(chrono (t 300))